package ch.fusun.baron.player;

import ch.fusun.baron.core.injection.Inject;
import ch.fusun.baron.data.DataUpdate;
import ch.fusun.baron.player.api.MarriageService;

/**
 * Declines a marriage
 */
public class MarriageDeclinedDataUpdate implements DataUpdate {

	private Player proposer;
	private Player proposedTo;

	@Inject
	private transient MarriageService marriageService;

	/**
	 * Kryo
	 */
	public MarriageDeclinedDataUpdate() {
	}

	/**
	 * @param proposer
	 * @param proposedTo
	 */
	public MarriageDeclinedDataUpdate(Player proposer, Player proposedTo) {
		this.proposer = proposer;
		this.proposedTo = proposedTo;
	}

	@Override
	public void update() {
		marriageService.declineMarriage(proposer, proposedTo);
	}
}
